<?php
/**
 * Description of user_ability_status
 *
 * @author zhangqiquan
 */
namespace app\index\finder;
use lib\base\BaseController;
use model\index\UserAbilityStatus;
use model\index\UserAbility;
use think\Db;
class user_ability_status extends BaseController{
    public $tags = [
        'column_userName'=>'用户名',
    ];
    public $detail=[
        'detail_log'=>'能力值列表',
    ];
    public function detail_log($id){
        $data=UserAbilityStatus::get($id);
        if($data==false)           return '没有记录';
        $data=UserAbility::where(['user_id'=>$data->user_id])->column('*');
        if($data==false)           return '没有记录';
       return $this->fetch('',['data'=>$data]);
    }
    public function column_userName($row){
        $data=Db::name('user')->where(['id'=>$row['user_id']])->field('username')->find();
        return $data['username'];
    }
}
